<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
    <link rel="stylesheet" href="css/index.css">
    <script src="js/jquery-3.4.1.js"></script>
    <link rel="stylesheet" href="css/stuContent.css">
    <link rel="stylesheet" href="iconfont/iconfont.css">
    <link rel="stylesheet" href="css/studentTable.css">
    <script src="js/CourseAjax.js"></script>
    <script src="js/CourseTable.js"></script>
    <link rel="stylesheet" href="css/cover.css">
    <script src="js/jquery.cookie.js"></script>
    <script>
        $.ajax({
            url:'login/validateLogin.php',
            type:'post',
            data:{},
            dataType:'json',
            async:false,
            success:function (data) {
                if(data.code===200){
                    console.log(data.code)
                }else{
                    // location.href="login.html";
                }
            }
        });
    </script>

</head>
<body>
<div class="container">
    <div class="left">
        <div class="menuPad">
            <div class="menu student"><p>学生</p></div>
            <div class="menu course"><p>课程</p></div>
            <div class="menu"><p>选课</p></div>
        </div>
    </div>
    <div class="right">
        <div class="top">
            <img src="image/rightTop.svg" alt="">
            <button id="loginOut">退出</button>
        </div>
        <div class="bottom">
            <div class="add">
                <span>新增</span>
            </div>
            <div class="queryHunt">
                <span>用户名</span>
                <input type="text" placeholder="请输入名称"/>
                <div class="query">
                    <h>查询</h>
                </div>
            </div>
            <div class="tabPosi">
                <table>
                    <thead>
                    <th class="use1">序号</th>
                    <th class="use2">课名</th>
                    <th class="use3">科号</th>
                    <th class="use6">操作</th>
                    </thead>
                    <tbody id="courseList">

                    </tbody>
                </table>
                <div>
                    <button class="pageLeft" onclick="pre()" >&lt;</button>
                    <span id="pageBtn">

                    </span>
                    <button  class="pageRight" onclick="next()">&gt;</button>
                </div>
            </div>

        </div>
    </div>
</div>
<div class="cover" id="changeCover">
    <div class="dialog">
        <div class="header">
            <input type="hidden" id="courseId">
            <div class="dialog-title">姓名</div>
            <span class="header-right hover-cursor">x</span>
        </div>
        <div class="content">
            <lable>
                <div class="use1">
                    <span>课名：</span>
                    <input type="text" class="courseName">
                </div>
            </lable>
            <lable>
                <div class="use1">
                    <span>科号：</span>
                    <input type="text" class="courseNo">
                </div>
            </lable>


        </div>
        <div class="footer">
            <button id="courseChange"class="item save hover-cursor">确定</button>
            <button class="item cancel hover-cursor">取消</button>
        </div>
    </div>
</div>
<div class="cover" id="register">
    <div class="dialog">
        <div class="header">
            <div class="dialog-title">标题</div>
            <span class="header-right hover-cursor">x</span>
        </div>
        <div class="content">
            <lable>
                <div class="use1">
                    <span>课名：</span>
                    <input type="text" class="courseName">
                </div>
            </lable>
            <lable>
                <div class="use1">
                    <span>科号：</span>
                    <input type="text" class="courseNo">
                </div>
            </lable>

        </div>
        <div class="footer">
            <button id="courseAdd"class="item save hover-cursor">确定</button>
            <button class="item cancel hover-cursor">取消</button>
        </div>
    </div>
</div>

<script>
    $(function () {
        $(".student").click(function () {
            location.href="主页.html"
        })
        $("#loginOut").click(function () {
            $.removeCookie("PHPSESSID");
            location.href = "login.html";
        });
        $(".add").click(function () {
            $("#register").fadeIn(300);
        });
        $("#register .header-right").click(function () {
            $("#register").fadeOut(300);
        });
        $("#register .cancel").click(function () {
            $("#register").fadeOut(300);
        });
        $("#changeCover .cancel").click(function () {
            $("#changeCover").fadeOut(300);
        });
        $("#changeCover .header-right").click(function () {
            $("#changeCover").fadeOut(300);
        });
    });

</script>
</body>
</html>